﻿namespace Zeus.Components.ZipTool.Ionic
{
    public class ZipEntryInfo
    {
        public string FileName { get; set; }
        public int Crc { get; set; }

        public override bool Equals(object obj)
        {
            if (obj == null || GetType() != obj.GetType())
            {
                return false;
            }

            ZipEntryInfo fileInfo = obj as ZipEntryInfo;

            return fileInfo.FileName == FileName
                && fileInfo.Crc == Crc;
        }

        public override int GetHashCode()
        {
            return FileName.GetHashCode()
                ^ Crc.GetHashCode();
        }
    }
}
